package eureka.customer.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;
@RestController
public class CustomerColonyRestTemplateController {
    private static final String PAYMENT_URL = "http://EUREKA-PROVIDER-COLONY";

    @Resource
    private RestTemplate restTemplate;

    @RequestMapping(value = "/c1")
    public String con1(){
        return "template-" + restTemplate.getForObject(PAYMENT_URL +"/c1",String.class);
    }
}
